<?php
/*
 * SoloPHP PHP框架
 * $Author: Yotianya <yotianya@gmail.com>
 * $Dtime:2011-10-24
 * $Copyright: CopyRight By SoloPHP Yotianya
 */
class View{

    protected $template = NULL;
    public function __construct(){

    	 $this->template = new template();

    }
 	/**
 	 * 设置模板变量
 	 */

    public function assign($var, $value = '')
    {
     $key= @func_get_arg(0);
	 $value= @func_get_arg(1);
	 $this->template->assign($key,$value);
    }
 	/**
 	 * 显示模板
 	 */
    public function show($file)
    {
       $vdir=(APP_FILE=='index')?'default/':APP_FILE.'/';
       $this->template->templates_dir=VIEW.$vdir;
       $this->template->show($file);
    }
}